function widget:GetInfo()
	return {
		name = "Hotkeys",
		desc = "Adds hotkeys for various command",
		author = "Sean Heron and bob the dinosaur",
		date = "15. September 2009",
		license = "GNU GPL v2 or later",
		layer = 1,
		enabled = true
	}
end

local CMD_TOGGLE=35951
local CMD_JUMP = 32298

local qPressed = 0
local spacePressed = 0

-- there's a lua file we can include that has all the keys "numbers" saved under their "names" - include that.

function widget:Update()                                               ---0x066 is f
 
	--------General Hotkeys - for all Engines
	
	----TOGGLE PRIMARY/SECONDARY weapon ---------
	if (Spring.GetKeyState(0x071) == true and qPressed == 0 ) then     -- 0x071 is q i would like f but its used by default fight command
       qPressed = 3 --1
       local selectedunits = Spring.GetSelectedUnits()     
       for _,unitID in pairs(selectedunits) do
	   		Spring.GiveOrderToUnit(unitID,CMD_TOGGLE,{1},{}) 
       end
	end
    if (Spring.GetKeyState(0x071) == true and qPressed == 1 ) then     -- for q again - why use two buttons for toggling, fair enough
	   	qPressed = 4 --0
	   	local selectedunits = Spring.GetSelectedUnits()
	   	for _,unitID in pairs(selectedunits) do
	   		Spring.GiveOrderToUnit(unitID,CMD_TOGGLE,{0},{}) -- toggle off
	   	end
	end
	if (Spring.GetKeyState(0x071) == false and qPressed == 3 ) then 
	   qPressed = 1
	end
	if (Spring.GetKeyState(0x071) == false and qPressed == 4 ) then 
	   qPressed = 0
	end
	------------
	
	
	----------Engine/Ability specific Hotkeys ---------------
	
	--------Knight ---------------------------------
	---  later detect if knight so can use q for other natural ability ie cloak
	--- JUMP -----------
                                         ---0x020 is space
    if (Spring.GetKeyState(0x020) == true and spacePressed == 0 ) then     -- is space but should be q weapon switch is q and needs to be f
       spacePressed = 1 
		local selectedunits = Spring.GetSelectedUnits()     
		for _,unitID in pairs(selectedunits) do
		--	Spring.GiveOrderToUnit(unitID,CMD_JUMP,{1},{}) -- this won't work, I don't think... you don't want to give jump command, just select the order
		-- doesn't work like this - see comment line above
       end
	end
	if (Spring.GetKeyState(0x020) == false and spacePressed == 1 ) then 
	   spacePressed = 0
	end
	------
	
end


